package org.example.Lambda;

/**
 * @ClassName: LambdaDemo01
 * @Author NeySun
 * @Description: TODO
 * @Version 1.0
 * @Date 2022-03-03
 */

public class LambdaDemo01 {
    public static void main(String[] args) {

        //1.创建线程匿名内部类xx
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("新线程中run方法被执行了");
            }
        }).start();

        //2.创建线程匿名内部类 方法列表+内容
        new Thread(()-> {
                System.out.println("新线程中run方法被执行了"); }).start();
    }

}
